package com.sdy.hospitalguard.biz.service;

import com.sdy.common.model.BizException;
import com.sdy.hospitalguard.biz.model.AccessControlTerminal;
import com.sdy.hospitalguard.biz.model.MatchingPeople;
import com.sdy.mvc.service.BaseService;
import java.net.URISyntaxException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zzq
 * @since 2020-05-14
 */
public interface AccessControlTerminalService extends BaseService<AccessControlTerminal> {

    /**
     * 获取所有启用的门禁终端
     * @return
     */
    List<AccessControlTerminal> getTerminal();

    /**
     * 获取启用的门禁终端,根据传的第几栋楼
     * @return
     */
    List<AccessControlTerminal> getTerminal(String building);

    /**
     * 查询门禁终端的默认访客库id(4)修改到三方平台本地数据库
     * @throws BizException
     */
    void updateLibraries() throws BizException;

    /**
     * 人员信息新增
     * @return
     * @throws BizException
     */
    boolean addPerson(MatchingPeople matchingPeople) throws BizException;

    /**
     * 人员信息修改
     * @return
     * @throws BizException
     */
    boolean updatePerson(MatchingPeople matchingPeople) throws BizException;

    /**
     * 人员信息删除
     * @return
     * @throws BizException
     */
    boolean deletePerson(MatchingPeople matchingPeople) throws BizException;

    /**
     * 控制删除出门的门禁设备人员数据，type = 1,一般场景用不到
     * @param matchingPeople
     * @param type
     * @return
     * @throws BizException
     */
    boolean deletePerson(MatchingPeople matchingPeople, Integer type) throws BizException;

    AccessControlTerminal getAccess(String sign);

    /**
     * 查询并删除
     * @param cardId
     * @param building
     * @return
     * @throws BizException
     */
    boolean selectPersonId(String cardId, Integer building) throws BizException;

}
